package routers

import (
	"backend/controllers"
	"backend/services"
	"backend/utils"

	"github.com/gin-gonic/gin"
)

func RegisterUserRoutes(r *gin.RouterGroup) {
	UserService := services.NewUserService(utils.DB)
	userController := controllers.NewUserController(UserService)
	r.POST("/user/create", userController.CreateUser)
	r.PUT("/user/:id/update", userController.UpdateUser)
	r.GET("/user/:id", userController.GetUser)
	r.DELETE("/user/:id", userController.DeleteUser)
	r.GET("/user/list", userController.GetUserList)
	r.POST("/user/disable", userController.DisableUser)
	r.GET("/user/:id/bindgroup/list", userController.GetUserBindGroupList)
	r.POST("/user/bindgroup", userController.BindUserGroup)
	r.POST("/user/login", userController.Login)
	r.POST("/user/logout", userController.Logout)
	r.POST("/user/feishu/login", userController.FeiShuLogin)
}
